package com.ruoyi.merchant.api;

import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.domain.Shop;
import com.ruoyi.common.core.domain.ShopVerification;
import com.ruoyi.common.core.domain.SysUserRole;
import com.ruoyi.merchant.api.factory.RemoteMerchantFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

@FeignClient(contextId = "remoteMerchantService", value = ServiceNameConstants.MERCHANT_SERVICE, fallbackFactory = RemoteMerchantFallbackFactory.class)
public interface RemoteMerchantService {

    /**
     * 注册商家信息
     *
     * @param shop 用户信息
     * @param source 请求来源
     * @return 结果
     */
    @PostMapping("/shop/register1")
    public Integer registerShop(@RequestBody Shop shop, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);



    /**
     * 添加商家认证信息
     *
     * @param shopVerification 商铺认证信息
     * @param source 请求来源
     * @return 结果
     */
    @PostMapping("/shopVerification/register1")
    public Integer registerShopVerification(@RequestBody ShopVerification shopVerification, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);


}
